package xcmg.device.dao.mapper.basic;


import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.basic.ExcipientBindingInfoDO;
import xcmg.device.service.vo.basic.ExcipientBindingInfoVO;
import xcmg.device.service.vo.basic.ExcipientsReportVo;

@Mapper
public interface ExcipientBindingInfoMapper {

  List<ExcipientBindingInfoDO> listByMaterialsNo(@Param("materialsNo") String materialsNo,
      @Param("orgId") String orgId);

  Integer remove(@Param("ids") List<String> ids);

  Integer insert(ExcipientBindingInfoDO excipientBindingInfo);

  Integer countByMaterialsNo(@Param("materialsNo") String materialsNo,
      @Param("orgId") String orgId);

  ExcipientBindingInfoDO getByMaterialsAndExcipientNo(
      @Param("materialsNo") String materialsNo, @Param("excipientNo") String excipientNo,
      @Param("orgId") String orgId);

  List<ExcipientBindingInfoDO> list(ExcipientBindingInfoVO model);

  Integer update(ExcipientBindingInfoDO excipientBindingInfoDO);

  Integer deleteByMaterialsNo(@Param("materialsNo") String materialsNo,
      @Param("orgId") String orgId);

  /**
   * 报表数据
   *
   * @param model
   * @return
   */
  List<ExcipientsReportVo> listExcipientsData(ExcipientBindingInfoVO model);

}
